package com.happyclub.lcy.dao;


import com.happyclub.pojo.TbUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface IUser extends JpaRepository<TbUser,String > {

    //根据teamId查询该队伍所有用户的信息
    @Modifying
    @Query(value = "select * from TB_USER where USER_ID in(select USER_ID from TB_TOUR_TEAM where TEAM_ID = ?1) ",nativeQuery = true)
    List<TbUser> getAllUserInforByTeamId(String teamId);
}
